/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.base.domain.req;

import com.xy.lang.validation.annotation.AlertMessage;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 *
 *
 * @author zsp
 * @date 2021-12-28
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
public class SaveBomGoodsRequest {

    /**
     * 物料清单货品明细Id
     */
    private Long bomGoodsId;
    /**
     * 货品Id
     */
    @NotNull(message = "goodsId")
    @ApiModelProperty(value = "货品Id", required = true)
    @AlertMessage(code = "goodsId", msg = "物料Id不能为空")
    private Long goodsId;
    /**
     * 每单位生产物料用量，例如试剂的每升用量
     */
    @NotNull(message = "count")
    @ApiModelProperty(value = "每单位生产物料用量，例如试剂的每升用量", required = true)
    @AlertMessage(code = "count", msg = "物料用量不能为空")
    private Double count;
    /**
     * 生产货品单位
     */
    @NotNull(message = "unit")
    @ApiModelProperty(value = "生产货品单位", required = true)
    @AlertMessage(code = "unit", msg = "生产货品单位不能为空")
    private String unit;

}
